package cn.stylefeng.guns.modular.app.service;

import cn.stylefeng.guns.core.common.page.LayuiPageFactory;
import cn.stylefeng.guns.modular.app.entity.Favor;
import cn.stylefeng.guns.modular.app.mapper.FavorMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 自选Service
 *
 * @author yaying.liu
 * @since 2022-02-20 20:37:01
 */
@Service
public  class FavorService extends ServiceImpl<FavorMapper,Favor>{

    /**
    * 查询自选
    */
    public List<Favor> selectByCondition(Long memberid, String favortype, String coin) {
        return this.baseMapper.selectByCondition(memberid,favortype,coin);
    }

    /**
    * 删除自选
    */
    public int deleteFavor(Long coinApplyId) {
        return this.baseMapper.deleteById(coinApplyId);
    }

    /**
    * 添加自选
    */
    public void addFavor(Favor coinApply) {
        this.baseMapper.insert(coinApply);
    }
}